{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Импортирование нужных библиотек"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sqlite3\n",
    "import numpy as np\n",
    "import csv\n",
    "import pandas as pd\n",
    "import os\n",
    "import re\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.metrics import accuracy_score\n",
    "from sklearn.preprocessing import MinMaxScaler\n",
    "from sklearn.preprocessing import OneHotEncoder\n",
    "from sklearn.preprocessing import LabelEncoder\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.metrics import mean_squared_error\n",
    "from sklearn.model_selection import cross_val_score\n",
    "from sklearn.metrics import roc_auc_score\n",
    "from sklearn.compose import ColumnTransformer\n",
    "from scipy.stats import ttest_ind\n",
    "from sklearn.cluster import KMeans\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "import matplotlib.pyplot as plt\n",
    "import warnings\n",
    "\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Получение данных таблицы из .db файла"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Подключение к базе данных SQLite\n",
    "conn = sqlite3.connect('shop_database.db')\n",
    "cursor = conn.cursor()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Получаем и скачиваем все таблицы из БД\n",
    "tables_to_download = ['purchases', 'personal_data_coeffs', 'personal_data']\n",
    "\n",
    "for table_name in tables_to_download:\n",
    "    cursor.execute(f\"SELECT * FROM {table_name}\")\n",
    "    rows = cursor.fetchall()\n",
    "    \n",
    "    with open(f'{table_name}.csv', 'w', newline='', encoding='utf-8-sig') as file:\n",
    "        csv_writer = csv.writer(file)\n",
    "        csv_writer.writerow([i[0] for i in cursor.description])  # Записываем название колонок\n",
    "        csv_writer.writerows(rows) # Записываем данные"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Закрываем соединение с БД\n",
    "conn.close()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Изменение типа расширения с .txt на .csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def letter_replace_in_number(id_list):\n",
    "    new_list = []\n",
    "    for value in id_list:\n",
    "        value = value.replace(' ', '')\n",
    "        for i in value:\n",
    "            letters = re.sub('[0-9]','',i)\n",
    "            value = value.replace(letters, '')\n",
    "        new_list.append(value)\n",
    "    return new_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "neg_txt = open('ids_first_company_negative.txt', 'r')\n",
    "content1 = neg_txt.read()\n",
    "content1 = content1.replace(' ', '')\n",
    "ids_first_company_negative = content1.split(',')\n",
    "ids_first_company_negative = letter_replace_in_number(ids_first_company_negative)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "pos_txt = open('ids_first_company_positive.txt', 'r')\n",
    "content2 = pos_txt.read()\n",
    "ids_first_company_positive = content2.split(',')\n",
    "ids_first_company_positive = letter_replace_in_number(ids_first_company_positive)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Предобработка данных"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### personal_data.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>gender</th>\n",
       "      <th>age</th>\n",
       "      <th>education</th>\n",
       "      <th>city</th>\n",
       "      <th>country</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>36</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1201</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>35</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1134</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>37</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1198</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>48</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1134</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  gender  age education  city  country\n",
       "0   0       0   36   среднее  1201       32\n",
       "1   4       0   35   среднее  1134       32\n",
       "2   6       1   52   среднее  1188       32\n",
       "3   7       0   37   среднее  1198       32\n",
       "4   9       0   48   среднее  1134       32"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Загрузка таблицы personal_data из CSV файла\n",
    "personal_data = pd.read_csv('personal_data.csv')\n",
    "personal_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "id           0\n",
      "gender       0\n",
      "age          0\n",
      "education    0\n",
      "city         0\n",
      "country      0\n",
      "dtype: int64\n"
     ]
    }
   ],
   "source": [
    "# Подсчет пропусков в каждом столбце таблицы\n",
    "nan_count = personal_data.isnull().sum()\n",
    "\n",
    "# Вывод количества пропусков для каждого столбца\n",
    "print(nan_count)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Предварительная обработка данных и фильтрация для кода страны 32 завершена. Отфильтрованные данные сохранены в файл filtered_personal_data.csv\n"
     ]
    }
   ],
   "source": [
    "# Фильтрация данных для кода страны 32\n",
    "filtered_data = personal_data[personal_data['country'] == 32]\n",
    "\n",
    "# Сохранение отфильтрованных данных в новый CSV файл\n",
    "filtered_data.to_csv('filtered_personal_data.csv', index=False)\n",
    "\n",
    "# Вывод сообщения для подтверждения завершения задачи\n",
    "print(\"Предварительная обработка данных и фильтрация для кода страны 32 завершена. Отфильтрованные данные сохранены в файл filtered_personal_data.csv\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### personal_data_coeffs.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>lbt_coef</th>\n",
       "      <th>ac_coef</th>\n",
       "      <th>sm_coef</th>\n",
       "      <th>personal_coef</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>5.078678</td>\n",
       "      <td>-0.307147</td>\n",
       "      <td>0.959027</td>\n",
       "      <td>0.5072</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3</td>\n",
       "      <td>7.764766</td>\n",
       "      <td>-0.030225</td>\n",
       "      <td>0.794720</td>\n",
       "      <td>0.4304</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4</td>\n",
       "      <td>4.569378</td>\n",
       "      <td>0.063693</td>\n",
       "      <td>0.820892</td>\n",
       "      <td>0.5072</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7</td>\n",
       "      <td>5.188231</td>\n",
       "      <td>-0.000134</td>\n",
       "      <td>0.944113</td>\n",
       "      <td>0.5072</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  lbt_coef   ac_coef   sm_coef  personal_coef\n",
       "0   0  5.078678 -0.307147  0.959027         0.5072\n",
       "1   3  7.764766 -0.030225  0.794720         0.4304\n",
       "2   4  4.569378  0.063693  0.820892         0.5072\n",
       "3   6  8.150379  0.075200  0.836140         0.4304\n",
       "4   7  5.188231 -0.000134  0.944113         0.5072"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_coeffs = pd.read_csv('personal_data_coeffs.csv')\n",
    "data_coeffs.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Предварительная обработка данных завершена. Отфильтрованные данные сохранены в файл filtered_personal_data_coeffs.csv\n"
     ]
    }
   ],
   "source": [
    "data_coeffs = pd.read_csv('personal_data_coeffs.csv')\n",
    "\n",
    "# Удалить строки с пропусками\n",
    "data_coeffs.dropna(inplace=True)\n",
    "\n",
    "# Удаление дубликатов из таблицы\n",
    "data_coeffs.drop_duplicates(inplace=True)\n",
    "\n",
    "# Сохранение отфильтрованных данных в новый CSV файл\n",
    "data_coeffs.to_csv('filtered_personal_data_coeffs.csv', index=False)\n",
    "\n",
    "# Вывод сообщения для подтверждения завершения задачи\n",
    "print(\"Предварительная обработка данных завершена. Отфильтрованные данные сохранены в файл filtered_personal_data_coeffs.csv\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### purchases.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>product</th>\n",
       "      <th>colour</th>\n",
       "      <th>cost</th>\n",
       "      <th>product_sex</th>\n",
       "      <th>base_sale</th>\n",
       "      <th>dt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>Велосипед горный женский Stern Mira 2.0 26\"</td>\n",
       "      <td>белый/синий</td>\n",
       "      <td>13599</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>Стол Outventure</td>\n",
       "      <td>зелёный</td>\n",
       "      <td>1499</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>Набор Outventure: стол + 4 стула</td>\n",
       "      <td>бежевый</td>\n",
       "      <td>4799</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>Бутсы мужские GSD Astro</td>\n",
       "      <td>белый</td>\n",
       "      <td>1599</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3</td>\n",
       "      <td>Мяч футбольный PUMA TEAMFINAL 21.2 FIFA QUALIT...</td>\n",
       "      <td>мультицвет</td>\n",
       "      <td>7199</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id                                            product       colour   cost  \\\n",
       "0   0        Велосипед горный женский Stern Mira 2.0 26\"  белый/синий  13599   \n",
       "1   0                                    Стол Outventure      зелёный   1499   \n",
       "2   0                   Набор Outventure: стол + 4 стула      бежевый   4799   \n",
       "3   3                            Бутсы мужские GSD Astro        белый   1599   \n",
       "4   3  Мяч футбольный PUMA TEAMFINAL 21.2 FIFA QUALIT...   мультицвет   7199   \n",
       "\n",
       "   product_sex  base_sale  dt  \n",
       "0          0.0          1   7  \n",
       "1          NaN          0  37  \n",
       "2          NaN          0  37  \n",
       "3          1.0          0  13  \n",
       "4          NaN          0  27  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "purchases_data = pd.read_csv('purchases.csv')\n",
    "purchases_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Предварительная обработка данных завершена. Отфильтрованные данные сохранены в файл filtered_purchases.csv\n"
     ]
    }
   ],
   "source": [
    "missing_values = purchases_data.isnull().sum()\n",
    "\n",
    "# Удаление пропусков в каждом столбце таблицы\n",
    "purchases_data.dropna(inplace=True)\n",
    "\n",
    "# Удаление дубликатов в таблице\n",
    "purchases_data.drop_duplicates(inplace=True)\n",
    "\n",
    "# Сохранение отфильтрованных данных в новый CSV файл\n",
    "purchases_data.to_csv('filtered_purchases.csv', index=False)\n",
    "\n",
    "# Вывод сообщения для подтверждения завершения задачи\n",
    "print(\"Предварительная обработка данных завершена. Отфильтрованные данные сохранены в файл filtered_purchases.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>gender</th>\n",
       "      <th>age</th>\n",
       "      <th>education</th>\n",
       "      <th>city</th>\n",
       "      <th>country</th>\n",
       "      <th>lbt_coef</th>\n",
       "      <th>ac_coef</th>\n",
       "      <th>sm_coef</th>\n",
       "      <th>personal_coef</th>\n",
       "      <th>product</th>\n",
       "      <th>colour</th>\n",
       "      <th>cost</th>\n",
       "      <th>product_sex</th>\n",
       "      <th>base_sale</th>\n",
       "      <th>dt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>36</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1201</td>\n",
       "      <td>32</td>\n",
       "      <td>5.078678</td>\n",
       "      <td>-0.307147</td>\n",
       "      <td>0.959027</td>\n",
       "      <td>0.5072</td>\n",
       "      <td>Велосипед горный женский Stern Mira 2.0 26\"</td>\n",
       "      <td>белый/синий</td>\n",
       "      <td>13599</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "      <td>Кеды мужские Reebok Royal Complete Cln2</td>\n",
       "      <td>черный</td>\n",
       "      <td>4799</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "      <td>Футболка мужская Kappa Authentic Core</td>\n",
       "      <td>темно-синий</td>\n",
       "      <td>999</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "      <td>Кроссовки мужские adidas Lite Racer CLN 2.0</td>\n",
       "      <td>черный</td>\n",
       "      <td>7399</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>среднее</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "      <td>Кроссовки мужские adidas Lite Racer CLN 2.0</td>\n",
       "      <td>черный</td>\n",
       "      <td>7399</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  gender  age education  city  country  lbt_coef   ac_coef   sm_coef  \\\n",
       "0   0       0   36   среднее  1201       32  5.078678 -0.307147  0.959027   \n",
       "1   6       1   52   среднее  1188       32  8.150379  0.075200  0.836140   \n",
       "2   6       1   52   среднее  1188       32  8.150379  0.075200  0.836140   \n",
       "3   6       1   52   среднее  1188       32  8.150379  0.075200  0.836140   \n",
       "4   6       1   52   среднее  1188       32  8.150379  0.075200  0.836140   \n",
       "\n",
       "   personal_coef                                      product       colour  \\\n",
       "0         0.5072  Велосипед горный женский Stern Mira 2.0 26\"  белый/синий   \n",
       "1         0.4304      Кеды мужские Reebok Royal Complete Cln2       черный   \n",
       "2         0.4304        Футболка мужская Kappa Authentic Core  темно-синий   \n",
       "3         0.4304  Кроссовки мужские adidas Lite Racer CLN 2.0       черный   \n",
       "4         0.4304  Кроссовки мужские adidas Lite Racer CLN 2.0       черный   \n",
       "\n",
       "    cost  product_sex  base_sale  dt  \n",
       "0  13599          0.0          1   7  \n",
       "1   4799          1.0          1   3  \n",
       "2    999          1.0          0   8  \n",
       "3   7399          1.0          0  11  \n",
       "4   7399          1.0          0  13  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Обьединение предобработанных данных в один датафрейм\n",
    "# Загрузка отфильтрованных данных из файлов\n",
    "filtered_personal_data = pd.read_csv('filtered_personal_data.csv')\n",
    "filtered_personal_data_coeffs = pd.read_csv('filtered_personal_data_coeffs.csv')\n",
    "filtered_purchases = pd.read_csv('filtered_purchases.csv')\n",
    "\n",
    "# Объединение данных по столбцу 'id'\n",
    "merged_data = pd.merge(filtered_personal_data, filtered_personal_data_coeffs, on='id', how='inner')\n",
    "merged_data = pd.merge(merged_data, filtered_purchases, on='id', how='inner')\n",
    "\n",
    "# Вывод первых строк объединенного датафрейма\n",
    "merged_data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>gender</th>\n",
       "      <th>age</th>\n",
       "      <th>education</th>\n",
       "      <th>city</th>\n",
       "      <th>country</th>\n",
       "      <th>lbt_coef</th>\n",
       "      <th>ac_coef</th>\n",
       "      <th>sm_coef</th>\n",
       "      <th>personal_coef</th>\n",
       "      <th>cost</th>\n",
       "      <th>product_sex</th>\n",
       "      <th>base_sale</th>\n",
       "      <th>dt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>36</td>\n",
       "      <td>1</td>\n",
       "      <td>1201</td>\n",
       "      <td>32</td>\n",
       "      <td>5.078678</td>\n",
       "      <td>-0.307147</td>\n",
       "      <td>0.959027</td>\n",
       "      <td>0.5072</td>\n",
       "      <td>13599</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>1</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "      <td>4799</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>1</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "      <td>999</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>1</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "      <td>7399</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>1</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.150379</td>\n",
       "      <td>0.075200</td>\n",
       "      <td>0.836140</td>\n",
       "      <td>0.4304</td>\n",
       "      <td>7399</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>332945</th>\n",
       "      <td>178004</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>0</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.437832</td>\n",
       "      <td>-0.080251</td>\n",
       "      <td>0.938592</td>\n",
       "      <td>0.4688</td>\n",
       "      <td>13999</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>332946</th>\n",
       "      <td>178004</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>0</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.437832</td>\n",
       "      <td>-0.080251</td>\n",
       "      <td>0.938592</td>\n",
       "      <td>0.4688</td>\n",
       "      <td>7999</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>332947</th>\n",
       "      <td>178004</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>0</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.437832</td>\n",
       "      <td>-0.080251</td>\n",
       "      <td>0.938592</td>\n",
       "      <td>0.4688</td>\n",
       "      <td>24299</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>332948</th>\n",
       "      <td>178004</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>0</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.437832</td>\n",
       "      <td>-0.080251</td>\n",
       "      <td>0.938592</td>\n",
       "      <td>0.4688</td>\n",
       "      <td>24299</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>332949</th>\n",
       "      <td>178004</td>\n",
       "      <td>1</td>\n",
       "      <td>52</td>\n",
       "      <td>0</td>\n",
       "      <td>1188</td>\n",
       "      <td>32</td>\n",
       "      <td>8.437832</td>\n",
       "      <td>-0.080251</td>\n",
       "      <td>0.938592</td>\n",
       "      <td>0.4688</td>\n",
       "      <td>7999</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>332950 rows × 14 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            id  gender  age  education  city  country  lbt_coef   ac_coef  \\\n",
       "0            0       0   36          1  1201       32  5.078678 -0.307147   \n",
       "1            6       1   52          1  1188       32  8.150379  0.075200   \n",
       "2            6       1   52          1  1188       32  8.150379  0.075200   \n",
       "3            6       1   52          1  1188       32  8.150379  0.075200   \n",
       "4            6       1   52          1  1188       32  8.150379  0.075200   \n",
       "...        ...     ...  ...        ...   ...      ...       ...       ...   \n",
       "332945  178004       1   52          0  1188       32  8.437832 -0.080251   \n",
       "332946  178004       1   52          0  1188       32  8.437832 -0.080251   \n",
       "332947  178004       1   52          0  1188       32  8.437832 -0.080251   \n",
       "332948  178004       1   52          0  1188       32  8.437832 -0.080251   \n",
       "332949  178004       1   52          0  1188       32  8.437832 -0.080251   \n",
       "\n",
       "         sm_coef  personal_coef   cost  product_sex  base_sale  dt  \n",
       "0       0.959027         0.5072  13599          0.0          1   7  \n",
       "1       0.836140         0.4304   4799          1.0          1   3  \n",
       "2       0.836140         0.4304    999          1.0          0   8  \n",
       "3       0.836140         0.4304   7399          1.0          0  11  \n",
       "4       0.836140         0.4304   7399          1.0          0  13  \n",
       "...          ...            ...    ...          ...        ...  ..  \n",
       "332945  0.938592         0.4688  13999          1.0          0   6  \n",
       "332946  0.938592         0.4688   7999          1.0          0  12  \n",
       "332947  0.938592         0.4688  24299          1.0          0  13  \n",
       "332948  0.938592         0.4688  24299          1.0          0  20  \n",
       "332949  0.938592         0.4688   7999          1.0          0  20  \n",
       "\n",
       "[332950 rows x 14 columns]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "label_encoder = LabelEncoder()\n",
    "merged_data['education'] = label_encoder.fit_transform(merged_data['education'])\n",
    "merged_data = merged_data.drop(['product'], axis=1)\n",
    "merged_data = merged_data.drop(['colour'], axis=1)\n",
    "merged_data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Проверка и удаление NaN и бесконечных значений в соединенном датафрейме"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Заменяем бесконечные значения на NaN\n",
    "merged_data = merged_data.replace([np.inf, -np.inf], np.nan)\n",
    "\n",
    "# Теперь удаляем строки с NaN, потому что они могут помешать нашему анализу\n",
    "merged_data = merged_data.dropna()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Построение модели классификации"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Среднеквадратическая ошибка: 26120104.556483123\n",
      "Средняя среднеквадратическая ошибка кросс-валидации: 27060141.846597336\n"
     ]
    }
   ],
   "source": [
    "# Определите признаки (X) и целевую переменную (y)\n",
    "X = merged_data.drop('cost', axis=1)  # Признаки\n",
    "y = merged_data['cost']  # Целевая переменная\n",
    "\n",
    "# Разделите данные на обучающий и тестовый наборы\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n",
    "\n",
    "# Создайте и обучите модель линейной регрессии\n",
    "model = LinearRegression()\n",
    "model.fit(X_train, y_train)\n",
    "\n",
    "# Сделайте прогноз на тестовом наборе\n",
    "predictions = model.predict(X_test)\n",
    "\n",
    "# Рассчитайте среднеквадратическую ошибку\n",
    "mse = mean_squared_error(y_test, predictions)\n",
    "print(f\"Среднеквадратическая ошибка: {mse}\")\n",
    "\n",
    "# Выполните кросс-валидацию\n",
    "cv_scores = cross_val_score(model, X_train, y_train, cv=5, scoring='neg_mean_squared_error')\n",
    "print(f\"Средняя среднеквадратическая ошибка кросс-валидации: {-np.mean(cv_scores)}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# AB test\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "p-value: 0.8534573418218281\n",
      "Нет статистически значимой разницы между группами.\n"
     ]
    }
   ],
   "source": [
    "# A/B тестировние \n",
    "with open('ids_first_company_positive.txt', 'r') as f:\n",
    "    content_positive = f.read()\n",
    "\n",
    "with open('ids_first_company_negative.txt', 'r') as f:\n",
    "    content_negative = f.read()\n",
    "\n",
    "# Удаление текста и символов новой строки из строк\n",
    "content_positive = content_positive.replace('Ids of positive AB people ', '').replace('\\n', '')\n",
    "content_negative = content_negative.replace('Ids of negative AB people ', '').replace('\\n', '')\n",
    "\n",
    "# Удаление нежелательных символов\n",
    "import re\n",
    "content_positive = re.sub('[^0-9,]', '', content_positive)\n",
    "content_negative = re.sub('[^0-9,]', '', content_negative)\n",
    "\n",
    "# Преобразовать содержимое в списки значений \n",
    "data_positive = []\n",
    "for value in content_positive.split(','):\n",
    "    try:\n",
    "        if value != '':\n",
    "            data_positive.append(float(value))\n",
    "    except ValueError:\n",
    "        print(f\"ValueError: could not convert string to float: '{value}'\")\n",
    "        continue\n",
    "\n",
    "data_negative = []\n",
    "for value in content_negative.split(','):\n",
    "    try:\n",
    "        if value != '':\n",
    "            data_negative.append(float(value))\n",
    "    except ValueError:\n",
    "        print(f\"ValueError: could not convert string to float: '{value}'\")\n",
    "        continue\n",
    "\n",
    "# Удалить значения NaN и inf из данных\n",
    "data_positive = [value for value in data_positive if np.isfinite(value)]\n",
    "data_negative = [value for value in data_negative if np.isfinite(value)]\n",
    "\n",
    "# Проверка на наличие достаточного количества наблюдений\n",
    "if len(data_positive) > 1 and len(data_negative) > 1:\n",
    "    # Провести t-тест для сравнения средних значений двух групп\n",
    "    t_stat, p_value = ttest_ind(data_positive, data_negative)\n",
    "\n",
    "    # Определить значимость результата\n",
    "    if p_value < 0.05:\n",
    "        print('p-value:', p_value)\n",
    "        print(\"Разница между группами является статистически значимой.\")\n",
    "    else:\n",
    "        print('p-value:', p_value)\n",
    "        print(\"Нет статистически значимой разницы между группами.\")\n",
    "else:\n",
    "    print(\"Недостаточно данных для проведения A/B тестирования.\")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Кластеризация аудитории"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "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JOJd/Se60AwF2lxJEFQ++pi6ox399tf5tQIiIialVymYARXd2x+dn+WBreVe+1IoC0/DKcTMptneLAcENERET3wM6yYTuNZxaW3f2iZsJwQ0RERE3maqts1uuaA8MNERERNVlfX0d4qJSobzSNgOpZU319HVutJoYbIiIiajK5TMDisUEAUCvg1Py8eGxQqy78x3BDRERE92RksAdWTe0Fd5Vu15O7Stks08Aby+zulxARERHpNzLYA8OD3FtsheLGYLghIiKiZiGXCQjr6CR1GeyWIiIiIuPCcENERERGheGGiIiIjArDDRERERkVhhsiIiIyKgw3REREZFQYboiIiMioMNwQERGRUWG4ISIiIqNicisUi6IIACgoKJC4EiIiImqomu/tmu9xfUwu3BQWFgIAvL29Ja6EiIiIGquwsBAqlUrvNYLYkAhkRDQaDW7evAlbW1sIQutv5tUWFBQUwNvbG6mpqbCzs5O6HJPH34dh4e/DsPD3YXha6nciiiIKCwvRrl07yGT6R9WYXMuNTCaDl5eX1GW0CXZ2dvzLwoDw92FY+PswLPx9GJ6W+J3crcWmBgcUExERkVFhuCEiIiKjwnBDtSgUCixevBgKhULqUgj8fRga/j4MC38fhscQficmN6CYiIiIjBtbboiIiMioMNwQERGRUWG4ISIiIqPCcENERERGheGGAACRkZHo06cPbG1t4erqinHjxiEuLk7qsui29957D4IgYN68eVKXYtJu3LiBqVOnwsnJCZaWlujWrRtOnz4tdVkmSa1W480334Svry8sLS3RsWNHLF26tEH7DtG9O3ToEMaOHYt27dpBEARs3bpV57woinjrrbfg4eEBS0tLDBs2DPHx8a1WH8MNAQAOHjyI2bNn4/jx49i7dy8qKyvx0EMPobi4WOrSTN6pU6ewevVqdO/eXepSTNqtW7cwYMAAmJubY+fOnbh48SKWLVsGBwcHqUszSe+//z5WrVqFlStX4tKlS3j//ffxwQcf4LPPPpO6NJNQXFyMHj164D//+U+d5z/44AOsWLECX3zxBU6cOAFra2uMGDECZWVlrVIfp4JTnbKysuDq6oqDBw9i8ODBUpdjsoqKitCrVy98/vnn+Ne//oWQkBAsX75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L5ubmooeHh/jCCy/Uuq++AcU1D1tbW3HIkCHi2bNntedzc3PFJ554QlSpVKKlpaU4YsQI8cqVK/XWX9d7yMrKEl1dXcXVq1c3+PNLSkoSH3jgAdHS0lL09vYWV65cKQ4ZMkScO3eu9jmlpaXiSy+9JHp4eIgWFhaiv7+/+M033+jUUt+AYlGsHhD8yCOPiPb29qKlpaXYpUsXcd68edoBxEOGDBGff/558dlnnxXt7OxEBwcH8bXXXtMZYHy3z2ft2rXaz1cQBNHd3V187rnnxLKyMr2fIZGhE0TxjkURiIioTbj//vsREhKC5cuXS10KkcFhtxQREREZFYYbIiIiMirsliIiIiKjwpYbIiIiMioMN0RERGRUGG6IiIjIqDDcEBERkVFhuCEiIiKjwnBDRERERoXhhoiIiIwKww0REREZFYYbIiIiMir/D8MsCCjMhTfpAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Предполагаем, что 'X' - это DataFrame с данными для кластеризации\n",
    "scaler = StandardScaler()\n",
    "X_scaled = scaler.fit_transform(X)\n",
    "\n",
    "# Поиск оптимального количества кластеров\n",
    "inertia = []\n",
    "for k in range(1, 11):\n",
    "    kmeans = KMeans(n_clusters=k, random_state=42)\n",
    "    kmeans.fit(X_scaled)\n",
    "    inertia.append(kmeans.inertia_)\n",
    "\n",
    "plt.plot(range(1, 11), inertia, marker='o')\n",
    "plt.title('Метод локтя')\n",
    "plt.xlabel('Количество кластеров')\n",
    "plt.ylabel('Инерция')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Построение модели склонности клиента к покупке"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Точность модели: 0.5953361180394867\n"
     ]
    }
   ],
   "source": [
    "# Определение признаков (X) и целевой переменной (y)\n",
    "X = merged_data.drop(['id', 'dt', 'base_sale'], axis=1)  # Признаки\n",
    "y = merged_data['base_sale']  # Целевая переменная\n",
    "\n",
    "# Преобразование категориальных переменных в числовой формат\n",
    "categorical_features = ['gender', 'city', 'country']\n",
    "one_hot_encoder = OneHotEncoder()\n",
    "transformer = ColumnTransformer([(\"one_hot\", one_hot_encoder, categorical_features)], remainder='passthrough')\n",
    "\n",
    "X_transformed = transformer.fit_transform(X)\n",
    "\n",
    "# Разделение данных на обучающий и тестовый наборы\n",
    "X_train, X_test, y_train, y_test = train_test_split(X_transformed, y, test_size=0.2, random_state=42)\n",
    "\n",
    "# Создание и обучение модели логистической регрессии\n",
    "model = LogisticRegression(max_iter=1000)\n",
    "model.fit(X_train, y_train)\n",
    "\n",
    "# Прогнозирование на тестовом наборе\n",
    "predictions = model.predict(X_test)\n",
    "\n",
    "# Расчет точности модели\n",
    "accuracy = accuracy_score(y_test, predictions)\n",
    "print(f\"Точность модели: {accuracy}\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
